<head>
<title>Contact</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="keywords" content="">
<script type="application/x-javascript"> addEventListener("load", function() { setTimeout(hideURLbar, 0); }, false); function hideURLbar(){ window.scrollTo(0,1); } </script>
<link href="__PUBLIC__/Home/css/bootstrap.css" rel="stylesheet" type="text/css">
<!-- Custom Theme files -->
<link href="__PUBLIC__/Home/css/style.css" rel="stylesheet" type="text/css">	
<script src="__PUBLIC__/Home/js/jquery-1.11.1.min.js"></script>
<!--webfonts-->

<!--//webfonts-->
</head>
<body>
	<!--start-home-->

	<!--contact-->
			<div class="contact">
				<div class="container">
					<h3>欢迎登录ET教育平台</h3>
						<div class="contact-top" >
							<div class="col-md-8 contact-top-right" >
								<form style="margin-left: 12%">
									
									 <input type="text" class="text" id="passport" name="passport" value="用户名" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '用户名';}" style="width: 270px"><br>
									<input type="text" class="text" id="password" name="password" value="密码" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '密码';}" style="width: 270px"><br>


									<p id = 'pverity' class="form-msg form-error" style="opacity: 1;display:none"><span class="ico__error"></span><em>验证码错误</em></p><input type="text" class="text" value="验证码" onfocus="this.value = '';" onblur="if (this.value == '') {this.value = '验证码';}" style="width: 100px">
										
                                       <img id="J_CaptchaImg" onclick=''   alt="验证码" src="{:U('Home/Login/verifycode')}" >
                                        <a widget="button" type="button" id="J_CaptchaChange" class="btn btn-large btn-minor">
                                              
												点击我刷新验证
                                        </a>
											 
									<div class="sub-button" >
										<input type="submit"  value="登录" id="J_SubmitLogin" style="height: 47px">
									</div>
										&nbsp;&nbsp;<a class="read" href="about.html" style="width: 120px;height: 47px">注册</a>
								</form>
							</div>
							
						<div class="clearfix"> </div>
					</div>
					
				</div>
			</div>
	
		<a href="#home" id="toTop" class="scroll" style="display: block;"> <span id="toTopHover" style="opacity: 1;"> </span></a>
		<script>
		$('#J_SubmitLogin').click(function(){
    var passport = $('#passport').val();
    var password = $('#password').val();
    var verifycode = $('#captcha').val();
    //判断账号密码是否为空
    console.log(passport);
    if(passport =='' || password == ''){
        $('#passport').addClass('form_input_error');
        $('#password').addClass('form_input_error');
        $('#pport').show();
        return;
    }
    //判断验证码是否为空
    if(verifycode == ''){
        $('#pverity').show();
        $('#pverity').addClass('form_input_error');
        return;
    }

    $.post("{:U('Home/Login/deallog')}",{passport:passport,password:password,verifycode:verifycode},function(data){
        if(data.verifycodeok != 1)
        {
            $('#pverity').addClass('form_input_error');
            $('#pverity').show();
            return;
        }

        if(data.logok != 1)
        {
            $('#passport').addClass('form_input_error');
            $('#password').addClass('form_input_error');
            $('#pport').show();
            return;
        }
        parent.location.reload();
    },"json");
    return false;
});
					  //刷新验证码
    $('#J_CaptchaChange').click(function(){
        $('#J_CaptchaImg').attr('src','{:U("Home/Login/verifycode")}?t='+Math.random());
        return false;
    });
    //点击隐藏提示信息
    $('#portholder').click(function(){
        $('#portholder label').hide();
        $('#portholder input').focus();
        $('#pport').hide();
        $('#passport').removeClass('form_input_error');
        $('#password').removeClass('form_input_error');
    });
    $('#wordholder').click(function(){
        $('#wordholder label').hide();
        $('#wordholder input').focus();
        $('#pport').hide();
        $('#passport').removeClass('form_input_error');
        $('#password').removeClass('form_input_error');
    });
    $('#verifycodeholder').click(function(){
        $('#verifycodeholder label').hide();
        $('#verifycodeholder input').focus();
        $('#pverity').hide();
        $('#captcha').removeClass('form_input_error');
    });


		</script>
</body>
